from setuptools import setup, find_packages

package = 'geosearch'
version = '0.1.0'

setup(
    name=package,
    version=version,
    description='GeoSearch app to load SOLR with geo point data',
    long_description=open('./README.txt').read(),
    author='Frank Purcell',
    author_email='fxpurcell@gmail.com',
    url='https://gs.gtfsdb.com/%s/tags/rel-%s' % (package, version),
    download_url='http://gs.gtfsdb.com/%s-%s.tar.gz' % (package, version),
    classifiers=(
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'Programming Language :: Python,Java,Tomcat,SOLR',
    ),
    install_requires=(
        '',
    ),
    packages=find_packages(),
)


#
#
#
def initDB(options):
    path = pkg_resources.resource_filename('geosearch', '.', '..')
    filename = 'setup.cfg' %(path)
    config = ConfigParser.ConfigParser()
    config.read(filename)

    section = 'options'
    options.database = config.get(section, 'database')

